package com.simple.piger.enums;

import org.apache.commons.lang3.StringUtils;

public enum CompanyJobStatusEnums {
    ING("ING", "招聘中"),
    ED("ED", "已停招");

    private String item;

    private String desc;

    CompanyJobStatusEnums(String item, String desc) {
        this.item = item;
        this.desc = desc;
    }

    public String getItem() {
        return item;
    }

    public void setItem(String item) {
        this.item = item;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String transfer(String gender) {
        if (StringUtils.isBlank(gender)) {
            return null;
        }
        for (CompanyJobStatusEnums enums : CompanyJobStatusEnums.values()) {
            if (enums.getItem().equals(gender)) {
                return enums.getDesc();
            }
        }
        return null;
    }
}
